<div class="panel panel-default corner-radius" >

    <div class="panel-body text-center topic-author-box blog-info">

        <!-- <div class="image blog-cover">
            <a href="{{ route('wildcard', $blog->slug) }}" >
                <img class=" avatar-112 avatar img-thumbnail" src="{{ img_crop($blog->cover, 224, 224) }}">
            </a>
        </div>
        <div class="blog-name">
            <h4><a href="{{ route('wildcard', $blog->slug) }}">{{ $blog->name }}</a></h4>
        </div>
        <div class="blog-description">
            {{ $blog->description ?: $user->name . '的个人博客' }}
        </div>

        <hr>

        <a href="{{ route('wildcard', $blog->slug) }}" class="{{ navViewActive('users.articles') }}">
            <li class="list-group-item"><i class="text-md fa fa-list-ul"></i> &nbsp;博客文章（{{ $blog->article_count }}）</li>
        </a>

        @if ($currentUser && ($currentUser->id == $user->id || Entrust::can('manage_users')) )
            <hr>
        <div class="follow-box">
            <a class="btn btn-info btn-block" href="{{ route('blogs.edit', $blog->id) }}">
                <i class="fa fa-edit"></i> 编辑博客
            </a>
        </div>
        @endif

        @if ($currentUser && $currentUser->id != $user->id)
            <hr>

            @if ($currentUser->subscribe($blog))
                <a data-method="post" class="btn btn-default btn-block" href="javascript:void(0);" data-url="{{ route('blogs.unsubscribe', $blog->id) }}">
                <i class="fa fa-minus"></i> 取消订阅
                </a>
            @else
                <div class="follow-box">
                    <a data-method="post" class="btn btn-primary btn-block" href="javascript:void(0);" data-url="{{ route('blogs.subscribe', $blog->id) }}">
                    <i class="fa fa-eye"></i> 订阅博客
                    </a>
                </div>
            @endif
        @endif -->
        <div class='content'>
            <!-- <a href="" class='rm-link-color'>
                <img class='circular   f-right  image-44' src="https://iocaffcdn.phphub.org/uploads/avatars/1_1530614766.png!/both/200x200" alt="">
            </a> -->
            <a href="{{ route('wildcard', $blog->slug) }}" >
                <img class="circular   f-right  image-44" src="{{ img_crop($blog->cover, 224, 224) }}">
            </a>
            <div class="header-1 text-left">
                <a href="{{ route('wildcard', $blog->slug) }}">{{ $blog->name }}</a>
            </div>
            <div class="header-2 text-left">
                记录生活
            </div>
        </div>
        <hr>
        <div class="statistics">
            <div class="statistic">
             
                <div class="label">文章</div>
            </div>
            <div class="statistic">
               
                <div class="label">
                    粉丝
                </div>
            </div>
            <div class="statistic">
                
                <div class="label">喜欢</div>
            </div>
            <div class="statistic">
               
                <div class="label">收藏</div>
            </div>
        </div>
        <div class="statistics">
            <div class="statistic">
             
                <div class="value">{{ number_shorten($blog->article_count) }}</div>
            </div>
            <div class="statistic">
               
                <div class="value">
                    {{ number_shorten($user->follower_count) }}
                </div>
            </div>
            <div class="statistic">
                
                <div class="value">{{ number_shorten($user->vote_count) }}</div>
            </div>
            <div class="statistic">
               
                <div class="value">{{ number_shorten($user->vote_count) }}</div>
            </div>
        </div>
        <hr>
        <div class="stats">
            <div class="stat">
                排名 ：{{number_shorten($user->blog_rank)}}
            </div>
            <div class="stat">
                访问 ：{{number_shorten($user->view_count)}}
            </div>
        </div>
        <hr>
            @if(Auth::check() && $currentUser->id != $user->id)
        <div class="stats" >
            <div class="stat">
                <?php $isFollowing = $currentUser && $currentUser->isFollowing($user->id) ?>
                <button data-method="post" class="btn btn-{{ !$isFollowing ? 'warning' : 'default' }} btn-block" href="javascript:void(0);" data-url="{{ route('users.doFollow', $user->id) }}" id="user-edit-button">
                    <i class="fa {{!$isFollowing ? 'fa-plus' : 'fa-minus'}}"></i> {{ !$isFollowing ? '关注 Ta' : '已关注' }}
                </button>
                {{--<button data-method="post" class="btn btn-warning btn-block" href="javascript::void(0);" data-url="{{route('users.doFollow', ['id' => $user->id])}}" id="user-edit-button" ><i class="fa fa-plus"></i> 关注</button>--}}
            </div>
            <div class="stat">
                <a class="btn btn-default btn-block" href="{{ route('messages.create', $user->id) }}"><i class="fa fa-envelope-o"></i> 私信</a>
            </div>
            
            
        </div>
        <hr>
            @endif
        <div>
        <a href="{{ route('wildcard', $blog->slug) }}" class="{{ navViewActive('users.articles') }}">
                <li class="list-group-item"><i class="text-md fa fa-list-ul"></i> &nbsp;博客文章（{{ number_shorten($blog->article_count) }}）</li>
            </a>
            @if ($currentUser && ($currentUser->id == $user->id || Entrust::can('manage_users')) )
            <hr>
            <div class="follow-box">
                <a class="btn btn-info btn-block" href="{{ route('blogs.edit', $blog->id) }}">
                    <i class="fa fa-edit"></i> 编辑博客
                </a>
            </div>
            @endif

            @if ($currentUser && $currentUser->id != $user->id)
                <hr>

                @if ($currentUser->subscribe($blog))
                    <a data-method="post" class="btn btn-default btn-block" href="javascript:void(0);" data-url="{{ route('blogs.unsubscribe', $blog->id) }}">
                    <i class="fa fa-minus"></i> 取消订阅
                    </a>
                @else
                    <div class="follow-box">
                        <a data-method="post" class="btn btn-warning btn-block" href="javascript:void(0);" data-url="{{ route('blogs.subscribe', $blog->id) }}">
                        <i class="fa fa-eye"></i> 订阅博客
                        </a>
                    </div>
                @endif
            @endif 
        </div>
        
    </div> 
    
   

</div>